/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.sll.itintegration.catalogue.mek.ejb;

import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import lombok.extern.slf4j.Slf4j;
import se.sll.service.catalogue.common.AbstractJpaFacade;
import se.sll.service.catalogue.idmap.entity.HSAEntity;

/**
 *
 * @author khaleddaham
 */
@Slf4j
@Stateless
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public class HSAMapEjb extends AbstractJpaFacade<HSAEntity> {

    @PersistenceContext(unitName = "idmapPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return this.em;
    }

    @Override
    protected void setEntityManager(EntityManager em) {
        this.em = em;
    }

    public HSAMapEjb() {
        super(HSAEntity.class);
    }
}
